package Exer04_循环;

import java.util.Scanner;

public class _1_4_1_依次输入10个数输出最大值 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一个值");
        int max = scanner.nextInt();
        for (int num = 2; num <= 10 ;num++ ){
            System.out.println("请输入第"+ num +"个值");
            int num1 = scanner.nextInt();
            if (num1 > max){
                max = num1;
            }
        }
        System.out.println("最大值为：" + max);
        scanner.close();
    }
}
